<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cn" lang="cn">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=8" />

	<title>test</title>

    <script type="text/javascript" src="scripts/mootools-1.2.4-core-yc.js"></script>
    <script type="text/javascript" src="scripts/mootools-1.2.4-more-yc.js"></script>
<script>

a1 = function(){alert('a1');myChain.callChain();}	;
a2 = function(){alert('a2');myChain.callChain();}	;
a3 = function(){alert('a3');myChain.callChain();}	;
a4 = function(){alert('a4');myChain.callChain();}	;
	
var myChain = new Chain();
myChain.chain(
    function(){ a1(); },
    function(){ a2(); },
    function(){ a3(); },
    function(){ a4(); }
).callChain();
//myChain.callChain(); //显示 'do dishes'.
//myChain.callChain(); //显示 'put away clean dishes'.
	
</script>

</head>
<body>

</html>
